<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="lb" uri="http://www.itlaobing.cn/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="lb" uri="http://www.itlaobing.cn/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<title>轮播图列表</title>
<css>
 <link rel="stylesheet" href="${ctx}/assets/app/css/management/pnzFocuss.css" />
</css>
<js>
<script type="text/javascript" src="${ctx}/assets/app/js/management/pnzFocuss.js"></script>
</js>
<div class="row no-gutter">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4>轮播图列表</h4>
                <ul class="links">
                    <li>
                        <a href="/management/pnzFocuss/create" title="新建">
                            <i class="fa fa-plus"></i> 新建
                        </a>
                    </li>
                </ul>
			</div>
			<div class="panel-body">
				<div class="row">
					<form class="form-horizontal" action="${ctx}/pnzFocuss" method="get">
						<div class="col-xs-3">
							<input id="title" name="title" class="form-control" placeholder="搜索标题" type="text" value="${param.title}"/>
						</div>
						<div class="col-xs-3">
							<button type="submit" class="btn btn-sm btn-success">
								<span class="fa fa-search"></span>
								查询
							</button>
						</div>
					</form>
				</div>
				<br />
				<div class="data-table">
					<table class="table table-bordered table-hover table-responsive">
					    <tr>
					        <td>标题</td>
					        <td>图片</td>
					        <td>链接url</td>
					        <td>权重</td>
					        <td>应用平台</td>
					        <td>显示位置</td>
					        <td>操作</td>
					    </tr>
					    <c:forEach var="focus" items="${focuss}">
					        <tr id="row${focus.id} ">
					            <td>${focus.title}</td>
					            <td><img src="${focus.img}" width="200"></td>
					            <td>${focus.targetUrl}</td>
					            <td>${focus.weight}</td>
					            <td>${focus.platform==1?'手机端':''}${focus.platform==2?'电脑端':''}</td>
					            <td>${focus.position==4?'APP首页':''}</td>
					            <td>
					                <div class="btn-group">
					                    <a class="btn btn-sm btn-info"
					                       href="${ctx}/pnzFocuss/${focus.id}">查看</a>
					                    <a class="btn btn-sm btn-primary"
					                            href="admin/pnzFocuss/update.html">编辑</a>
					                    <a class="btn btn-sm btn-danger btn-delete" data-remote="true" data-confirm="确定要删除吗?"
					                            href="${ctx}/pnzFocuss/${focus.id}">删除</a>
					                </div>
					            </td>
					        </tr>
					    </c:forEach>
					</table>
       			 </div>
				<lb:pagination pager="${focuss}"/>
			</div>
		</div>
	</div>
</div>
			